<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%-- <%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common/links.jsp"%>
 --%>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<script type="text/javascript">
	$(document).ready(
			
			function() {

				grid = $("#itemList"), lastSel = -1, editingRowId = -1;

				grid.jqGrid({
					url : "dictionaryItemGrid?dictionaryId=${dictionaryId}",
					datatype : "json",
					mtype : "GET",
					colNames : [ 'dictionaryItemId', 'value', 'content',
							'orderNo', 'dictionary.name' ],
					colModel : [ {
						name : 'dictionaryItemId',
						index : 'dictionaryItemId',
						width : 70,
						align : 'center',
						hidden : false
					}, {
						name : 'value',
						index : 'value',
						width : 80,
						align : 'center'
					}, {
						name : 'content',
						index : 'content',
						width : 80,
						align : 'center'
					}, {
						name : 'orderNo',
						index : 'orderNo',
						width : 80,
						align : 'center'
					}, {
						name : 'dictionary.name',
						index : 'dictionary.name',
						width : 80,
						align : 'center'
					}

					],
					jsonReader : {
						root : "pageList", // (2)
						page : "page",
						total : "total",
						records : "records", // (3)
						repeatitems : false
					// (4)
					},
					rowNum : 10,
					rowList : [ 5, 10, 20, 50, 100, 200 ],
					pager : '#itempager',
					gridview : true,
					rownumbers : true,
					sortname : 'dictionaryItemId',
					viewrecords : true,
					sortorder : 'desc',
					//caption : 'dictionaryItem',
					height : 300,
					autowidth : true,
					gridComplete : function() {
						if ($("#itemList").getDataIDs().length > 0) {
							$("#itemList").jqGrid('setSelection',
									$("#itemList").getDataIDs()[0]);//默认选中第一行
							//alert("gridComplete first id is :" + $("#dicList").getDataIDs()[0]);
						}

					}
				});
				jQuery("#itemList").jqGrid('navGrid', '#itempager', {
					edit : false,
					add : false,
					del : false,
					search : false
				}, {}, {}, {}, {
					multipleSearch : false,
					multipleGroup : false
				});
			
			
			});
	
</script>
</head>
<body>



				<table id="itemList"><tr><td/></tr></table>
				<div id="itempager"></div>
	
</body>

</html>